package com.audible.library.view.backing;

import java.io.Serializable;
import java.util.Collection;
import javax.enterprise.context.SessionScoped;
import javax.inject.Named;

/**
 * This view bean holds data related to the user. It contains information such
 * as user's first name, last name, username, etc. It also has a list of
 * audio books purchased by this user.
 *
 * @author Jigar Shah
 * @version 0.1
 */
@Named
@SessionScoped
public class UserInfo implements Serializable {
    
    private static final long serialVersionUID = -6491437136385949960L;

    /** User's first name */
    private String firstName;

    /** User's last name */
    private String lastName;

    /** User's username used for login purpose */
    private String userName;

    /** The collection of books purchased by the user */
    private Collection<PurchasedAudioBook> purchasedAudioBooks;

    public UserInfo() {
    }

    /**
     * @return the firstName
     */
    public String getFirstName() {
        return firstName;
    }

    /**
     * @param firstName the firstName to set
     */
    public void setFirstName(String firstName) {
        this.firstName = firstName;
    }

    /**
     * @return the lastName
     */
    public String getLastName() {
        return lastName;
    }

    /**
     * @param lastName the lastName to set
     */
    public void setLastName(String lastName) {
        this.lastName = lastName;
    }

    /**
     * @return the userName
     */
    public String getUserName() {
        return userName;
    }

    /**
     * @param userName the userName to set
     */
    public void setUserName(String userName) {
        this.userName = userName;
    }

    /**
     * @return the purchasedAudioBooks
     */
    public Collection<PurchasedAudioBook> getPurchasedAudioBooks() {
        return purchasedAudioBooks;
    }

    /**
     * @param purchasedAudioBooks the purchasedAudioBooks to set
     */
    public void setPurchasedAudioBooks(Collection<PurchasedAudioBook> purchasedAudioBooks) {
        this.purchasedAudioBooks = purchasedAudioBooks;
    }
}
